﻿using ConsoleApp1;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: 这行代码将数据加载到表“adamin3000DataSet.Users”中。您可以根据需要移动或删除它。
            //this.usersTableAdapter.Fill(this.adamin3000DataSet.Users);
            var table = "select * from Users";

            var dataTable= DbHelper.GetDataTable(table);

            DataGridView dataGridView = new DataGridView();

            MessageBox.Show("大爱海贼王~!","提示");



       

          

            //dataGridView1.DataSource =dataTable;

        }

        private void Form1_MouseClick(object sender, MouseEventArgs e)
        {
            List<Color> colors = new List<Color>();

            colors.Add(Color.Pink);

            colors.Add(Color.Yellow);

            colors.Add(Color.Blue);

            colors.Add(Color.Black);

            Random random = new Random();

            var randomNumber = random.Next(0,colors.Count);

            var randomColor = colors[randomNumber];

            BackColor = randomColor;

        }
    }
}
